﻿@model TumbaloSoft.Models.PersonaNatural 
@{
    Layout = "~/Views/Shared/_HomeLayout.cshtml";
    ViewBag.Title = "Su Inmueble";
}


<script>
    $(function () {
        $("#datepicker").datepicker({
            changeMonth: true,
            changeYear: true
        });
    });
</script>



<!-- content -->
<div class="body2">
	<div class="main">
		<section id="content">
			<div class="wrapper">

                        
                <article class="col5">
                <div>&nbsp</div>
                </article>

                <!--TODO-->
                <article class="col1" style="width: 500px">
                    <form id="form_1" method="post" style="height:100%">
                        <!--FORMULARIO-->

						<div class="pad1">
							<h2 class="pad_bot1 pad_top1">Registrar Su Inmueble</h2>

                            <!--DATOS DEL INMUEBLE-->
                                <h3 class="pad_bot1 pad_top1">Paso 1: Datos Personales </h3>
                                 <div>   

                                    <!--NOMBRE-->
                                   <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Nombre*:</span></td>
                                                <td style="width: 210px">
                                                    @Html.TextBoxFor(model => model.prNombre, new { @class="input", maxlength = "30",placeholder = "Maximo 30 caracteres aqui"})
                                                    @Html.ValidationMessageFor(model => model.prNombre,null)
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                             
                                    <!--APELLIDOPATERNO-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Apellido Paterno*:</span></td>
                                                <td style="width: 210px">    
                                                    @Html.TextBoxFor(model => model.prApellidoPaterno, new { @class="input",maxlength = "30", placeholder = "Maximo 30 caracteres aqui"})
                                                    @Html.ValidationMessageFor(model=> model.prApellidoPaterno,null)
                                                </td>
                                            </tr>
                                        </table>
                                    </div>

                                    <!--APELLIDOMATERNO-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Apellido Materno:</span></td>
                                                <td style="width: 210px">                                                                                                          
                                                        @Html.TextBoxFor(model => model.prApellidoMaterno, new { @class="input",maxlength = "30", placeholder = "Maximo 30 caracteres aqui"})
                                                        @Html.ValidationMessageFor(model=> model.prApellidoMaterno)                                                            
                                                </td>
                                            </tr>
                                        </table>
                                    </div>

                                    <!--TIPO DOCUMENTO-->
                                    <div class="row_select"">
                                        <table style="width:420px">
                                            <tr>
                                                <td style="width: 210px"><span>Tipo Documento:</span></td>
                                                <td style="width: 210px">   
                                                    <select name="prTipoDocumento.prIdTipoDocumento">                                                         
                                                        @foreach (var objTipo in ViewBag.listaTipo)
                                                        {
                                                            if (Model != null && Model.prTipoDocumento.prIdTipoDocumento == objTipo.prIdTipoDocumento)
                                                            {                           
                                                            <option value="@objTipo.prIdTipoDocumento" selected="selected">@objTipo.prDescripcion</option>
                                                            }
                                                            else
                                                            {
                                                                <option value="@objTipo.prIdTipoDocumento">@objTipo.prDescripcion</option>
                                                            }
                                                        }
                                                    </select>
                                                </td>                                              
                                            </tr>
                                        </table>
                                    </div>  

                                     <!--NUMERO DOCUMENTO-->
                                     <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Numero de Documento*:</span></td>
                                                <td style="width: 210px">    
                                                               
                                                                                                                                                                
                                                        @Html.TextBoxFor(model => model.prCodigoDocumento, new { @Class="input",maxlength = "8", minlength = "8"})
                                                        @Html.ValidationMessageFor(model=> model.prCodigoDocumento,null)       
                                                               
                                                                                                                                                                                        
                                                </td>
                                            </tr>
                                        </table>
                                    </div>

                                    <!--RUC-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>RUC:</span></td>
                                                <td style="width: 210px">                                                                                                          
                                                        @Html.TextBoxFor(model => model.prRuc, new { @Class="input",maxlength = "11", minlength = "8"})
                                                        @Html.ValidationMessageFor(model=> model.prRuc)                                                          
                                                </td>
                                            </tr>
                                        </table>
                                    </div>


                                    <!--SEXOOOOOOOOOO-->
                                    <div class="row_select">
                                        <table style="width:420px">
                                            <tr>
                                                <td style="width: 210px"><span>Sexo:</span></td>
                                                <td style="width: 210px">   
                                                    <select name="prSexo">                                 
                                                            @if (Model != null && Model.prSexo == "M")
                                                            {     
                                                                <option value="M" selected="selected">Masculino</option>
                                                                <option value="F">Femenino</option>
                                                            }
                                                            else
                                                                if (Model != null && Model.prSexo == "F")
                                                                {
                                                                    <option value="M">Masculino</option>
                                                                    <option value="F" selected="selected">Femenino</option>
                                                                }

                                                            else
                                                                {
                                                                    <option value="M">Masculino</option>
                                                                    <option value="F">Femenino</option>
                                                                }
                                                    </select>
                                                </td>                                              
                                            </tr>
                                        </table>                                                    
                                    </div>

                                    <!--FECHADENACIMIENTO-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Fecha de Nacimiento*:</span></td>
                                                <td style="width: 210px"> 
                                                    <input class="input" id="datepicker" name="prFechaNacimiento"/> 
                                                            
                                                    @Html.ValidationMessageFor(model=>model.prFechaNacimiento,null)  
                                                                                                                    
                                                </td>
                                            </tr>
                                        </table>                                                
                                    </div>


                                   <!--DIRECCION-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Direccion*:</span></td>
                                                <td style="width: 210px"> 
                                                    @Html.TextBoxFor(model => model.prDireccion, new { @Class="input",maxlength = "50", placeholder = "Maximo 50 caracteres aqui"})
                                                    @Html.ValidationMessageFor(model=> model.prDireccion,null)
                                                </td>
                                            </tr>
                                        </table>  
                                    </div>
                                                          
                                    <!--E-MAIL-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Email:</span></td>
                                                <td style="width: 210px"> 
                                                    @Html.TextBoxFor(model => model.prEmail, new { @Class="input",placeholder="ejemplo@dominio.com"})
                                                    @Html.ValidationMessageFor(model=> model.prEmail)
                                                </td>
                                            </tr>
                                        </table>            
                                    </div> 

                                   <!--TELEFONO-->
                                    <div class="row">
                                        <table style="width: 420px">
                                            <tr>
                                                <td style="width: 210px"><span>Telefono:</span></td>
                                                <td style="width: 210px"> 
                                                    @Html.TextBoxFor(model => model.prTelefono, new { @Class="input",maxlength = "9", minlength = "9"})
                                                    @Html.ValidationMessageFor(model=> model.prTelefono)
                                                </td>
                                            </tr>
                                        </table> 
                                    </div>

									<table style="width:500px">
									    	<tr>
											<td><a href="#"  class="button" onClick="document.getElementById('form_1').submit()">Guardar</a></td>
											<td><a href="#"  class="button" onClick="document.getElementById('form_1').reset()">Limpiar</a></td>
											<td><a href="..\Home\Index"  class="button" onClick="document.getElementById('form_1').cancel()">Cancelar</a></td>
									    </tr>
										<tr>	<td>&nbsp </td>
											<td>
												@if (@Model!=null)
												{
													<a href="/SuInmueble/RegistrarI?prIdPersona=@Model.prIdPersona"><img src="../../Content/site/images/icono_siguiente.png" /></a>
												} 
											</td>
											<td>&nbsp </td>
										</tr>
									</table>                                                                           
                                    
                               </div>
                        </div>
                    </form>
                </article>
			</div>
		</section>
	</div>
</div>  
<!-- / content -->
		
		<script type="text/javascript"> Cufon.now(); </script>
